<?php
namespace app\widget\model;
use think\Db;
use think\Controller;

class widgetAd extends Controller
{
    protected $beforeActionList = ['start'];
    public function start() {
      
        $this->settingInfo = config('settingInfo');
    }
    public function getItemListByTag($tag)
    {
        $tag = json_decode($tag,true);
        $name = isset($tag['name']) ? $tag['name'] : '';
        $itemInfo = db('WidgetAd')->where('name',$name)->find();
        return htmlspecialchars_decode($itemInfo['content']);
    }

}